package day1026.LaoShi;
//老师类
public class Teacher {
    String name;//姓名
    private int age;//年龄
    private int teachingage;
    private String sex;//性别

    //无参构造
    public Teacher() {
    }

    //有参构造
    public Teacher(String name, int age, int teachingage, String sex) {
        this.name = name;
        this.age = age;
        this.teachingage = teachingage;
        this.sex = sex;
    }

    //自我介绍
    public void selfIntroduce(){
        System.out.println("老师进行自我介绍:");
        System.out.println("大家好:我叫:"+this.name+",今年:"+this.age+"岁,教龄有:"+this.teachingage+"年,性别是:"+this.sex);
    }

    //上课
    public void giveLession(){
        System.out.println("老师正在上课:");
    }
}
